import javax.swing.*;
import java.awt.*;

public class App extends JFrame{
    private JPanel mainPanel;

    public App(){

        this.add(new Board());
        this.setResizable(false);
        pack();
        this.setTitle("贪吃蛇");
        // 居中
        //this.setLocationRelativeTo(null);
        // 指定位置
        this.setLocation(100,200);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    public static void main(String[] args){

        EventQueue.invokeLater(()->{
            JFrame app = new App();
            app.setVisible(true);
        });
    }
}
